package cc.chenwenxi.sdk.rainbow;

import com.pi4j.io.gpio.GpioFactory;
import com.pi4j.io.gpio.GpioPinDigitalOutput;
import com.pi4j.io.gpio.RaspiPin;

/**
 * 为什么low反而是亮,high是灭??
 */
public class LedKit {
	public static final GpioPinDigitalOutput led1 = GpioFactory.getInstance().provisionDigitalOutputPin(RaspiPin.GPIO_04);
	public static final GpioPinDigitalOutput led2 = GpioFactory.getInstance().provisionDigitalOutputPin(RaspiPin.GPIO_02);
	public static final GpioPinDigitalOutput led3 = GpioFactory.getInstance().provisionDigitalOutputPin(RaspiPin.GPIO_03);
	public static final GpioPinDigitalOutput led4 = GpioFactory.getInstance().provisionDigitalOutputPin(RaspiPin.GPIO_21);

	public void led1_high() {
		led1.low();
	}

	public void led2_high() {
		led2.low();
	}

	public void led3_high() {
		led3.low();
	}

	public void led4_high() {
		led4.low();
	}

	public void led1_low() {
		led1.high();
	}

	public void led2_low() {
		led2.high();
	}

	public void led3_low() {
		led3.high();
	}

	public void led4_low() {
		led4.high();
	}

}
